RavenDbUserAuthRepository<TUserAuth, TUserAuthDetails>
Assembly: ServiceStack.Authentication.RavenDb.dll
Declaration
public class RavenDbUserAuthRepository<TUserAuth, TUserAuthDetails> : IUserAuthRepositoryAsync, IAuthRepositoryAsync, IQueryUserAuthAsync, IManageApiKeysAsync, IUserAuthRepository, IAuthRepository, IQueryUserAuth, ICustomUserAuth, IManageApiKeys where TUserAuth : class, IUserAuth where TUserAuthDetails : class, IUserAuthDetails
Properties
IsInitialized
Declaration
public static bool IsInitialized { get; }
UserAuthIdentifier
Declaration
public string UserAuthIdentifier { get; set; }
UserAuthDetailsIdentifier
Declaration
public string UserAuthDetailsIdentifier { get; set; }
Methods
CreateOrUpdateUserAuthIndexAsync(IDocumentStore, CancellationToken)
Declaration
public static async Task CreateOrUpdateUserAuthIndexAsync(IDocumentStore store, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
IDocumentStore | store |
System.Threading.CancellationToken | token |
CreateUserAuthAsync(IUserAuth, String, CancellationToken)
Declaration
public async Task<IUserAuth> CreateUserAuthAsync(IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
DeleteUserAuthAsync(String, CancellationToken)
Declaration
public async Task DeleteUserAuthAsync(string ravenUserAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | ravenUserAuthId |
System.Threading.CancellationToken | token |
GetUserAuthAsync(String, CancellationToken)
Declaration
public async Task<IUserAuth> GetUserAuthAsync(string ravenUserAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | ravenUserAuthId |
System.Threading.CancellationToken | token |
UpdateUserAuthAsync(IUserAuth, IUserAuth, CancellationToken)
Declaration
public async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
UpdateUserAuthAsync(IUserAuth, IUserAuth, String, CancellationToken)
Declaration
public async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
CreateOrMergeAuthSessionAsync(IAuthSession, IAuthTokens, CancellationToken)
Declaration
public async Task<IUserAuthDetails> CreateOrMergeAuthSessionAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuthDetails>
Parameters
GetUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)
Declaration
public async Task<IUserAuth> GetUserAuthAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
GetUserAuthByUserNameAsync(String, CancellationToken)
Declaration
public async Task<IUserAuth> GetUserAuthByUserNameAsync(string userNameOrEmail, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | userNameOrEmail |
System.Threading.CancellationToken | token |
GetUserAuthDetailsAsync(String, CancellationToken)
Declaration
public async Task<List<IUserAuthDetails>> GetUserAuthDetailsAsync(string ravenUserAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>>
Parameters
Type | Name |
---|
System.String | ravenUserAuthId |
System.Threading.CancellationToken | token |
LoadUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)
Declaration
public async Task LoadUserAuthAsync(IAuthSession session, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
SaveUserAuthAsync(IAuthSession, CancellationToken)
Declaration
public async Task SaveUserAuthAsync(IAuthSession authSession, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
SaveUserAuthAsync(IUserAuth, CancellationToken)
Declaration
public async Task SaveUserAuthAsync(IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
TryAuthenticateAsync(String, String, CancellationToken)
Declaration
public async Task<IUserAuth> TryAuthenticateAsync(string userName, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | userName |
System.String | password |
System.Threading.CancellationToken | token |
TryAuthenticateAsync(Dictionary<String, String>, String, Int32, String, CancellationToken)
Declaration
public async Task<IUserAuth> TryAuthenticateAsync(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | privateKey |
System.Int32 | nonceTimeOut |
System.String | sequence |
System.Threading.CancellationToken | token |
GetUserAuthsAsync(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Declaration
public async Task<List<IUserAuth>> GetUserAuthsAsync(string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>
Parameters
Type | Name |
---|
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
System.Threading.CancellationToken | token |
SearchUserAuthsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Declaration
public async Task<List<IUserAuth>> SearchUserAuthsAsync(string query, string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>
Parameters
Type | Name |
---|
System.String | query |
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
System.Threading.CancellationToken | token |
ApiKeyExistsAsync(String, CancellationToken)
Declaration
public async Task<bool> ApiKeyExistsAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|
System.String | apiKey |
System.Threading.CancellationToken | token |
GetApiKeyAsync(String, CancellationToken)
Declaration
public async Task<ApiKey> GetApiKeyAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.ApiKey>
Parameters
Type | Name |
---|
System.String | apiKey |
System.Threading.CancellationToken | token |
GetUserApiKeysAsync(String, CancellationToken)
Declaration
public async Task<List<ApiKey>> GetUserApiKeysAsync(string userId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.ApiKey>>
Parameters
Type | Name |
---|
System.String | userId |
System.Threading.CancellationToken | token |
StoreAllAsync(IEnumerable<ApiKey>, CancellationToken)
Declaration
public async Task StoreAllAsync(IEnumerable<ApiKey> apiKeys, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey> | apiKeys |
System.Threading.CancellationToken | token |
CreateOrUpdateUserAuthIndex(IDocumentStore)
Declaration
public static void CreateOrUpdateUserAuthIndex(IDocumentStore store)
Parameters
Type | Name |
---|
IDocumentStore | store |
CreateUserAuth(IUserAuth, String)
Declaration
public IUserAuth CreateUserAuth(IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
DeleteUserAuth(String)
Declaration
public void DeleteUserAuth(string ravenUserAuthId)
Parameters
Type | Name |
---|
System.String | ravenUserAuthId |
GetUserAuth(String)
Declaration
public IUserAuth GetUserAuth(string ravenUserAuthId)
Returns
ServiceStack.Auth.IUserAuth
Parameters
Type | Name |
---|
System.String | ravenUserAuthId |
UpdateUserAuth(IUserAuth, IUserAuth)
Declaration
public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser)
Returns
ServiceStack.Auth.IUserAuth
Parameters
UpdateUserAuth(IUserAuth, IUserAuth, String)
Declaration
public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
CreateOrMergeAuthSession(IAuthSession, IAuthTokens)
Declaration
public IUserAuthDetails CreateOrMergeAuthSession(IAuthSession authSession, IAuthTokens tokens)
Returns
ServiceStack.Auth.IUserAuthDetails
Parameters
GetUserAuth(IAuthSession, IAuthTokens)
Declaration
public IUserAuth GetUserAuth(IAuthSession authSession, IAuthTokens tokens)
Returns
ServiceStack.Auth.IUserAuth
Parameters
GetUserAuthByUserName(String)
Declaration
public IUserAuth GetUserAuthByUserName(string userNameOrEmail)
Returns
ServiceStack.Auth.IUserAuth
Parameters
Type | Name |
---|
System.String | userNameOrEmail |
GetUserAuthDetails(String)
Declaration
public List<IUserAuthDetails> GetUserAuthDetails(string ravenUserAuthId)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>
Parameters
Type | Name |
---|
System.String | ravenUserAuthId |
LoadUserAuth(IAuthSession, IAuthTokens)
Declaration
public void LoadUserAuth(IAuthSession session, IAuthTokens tokens)
Parameters
SaveUserAuth(IAuthSession)
Declaration
public void SaveUserAuth(IAuthSession authSession)
Parameters
SaveUserAuth(IUserAuth)
Declaration
public void SaveUserAuth(IUserAuth userAuth)
Parameters
TryAuthenticate(String, String, out IUserAuth)
Declaration
public bool TryAuthenticate(string userName, string password, out IUserAuth userAuth)
Returns
System.Boolean
Parameters
TryAuthenticate(Dictionary<String, String>, String, Int32, String, out IUserAuth)
Declaration
public bool TryAuthenticate(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, out IUserAuth userAuth)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | privateKey |
System.Int32 | nonceTimeOut |
System.String | sequence |
ServiceStack.Auth.IUserAuth | userAuth |
GetUserAuths(String, Nullable<Int32>, Nullable<Int32>)
Declaration
public List<IUserAuth> GetUserAuths(string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
SearchUserAuths(String, String, Nullable<Int32>, Nullable<Int32>)
Declaration
public List<IUserAuth> SearchUserAuths(string query, string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | query |
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
ICustomUserAuth.CreateUserAuth()
Declaration
IUserAuth ICustomUserAuth.CreateUserAuth()
Returns
ServiceStack.Auth.IUserAuth
ICustomUserAuth.CreateUserAuthDetails()
Declaration
IUserAuthDetails ICustomUserAuth.CreateUserAuthDetails()
Returns
ServiceStack.Auth.IUserAuthDetails
ApiKeyExists(String)
Declaration
public bool ApiKeyExists(string apiKey)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | apiKey |
GetApiKey(String)
Declaration
public ApiKey GetApiKey(string apiKey)
Returns
ServiceStack.Auth.ApiKey
Parameters
Type | Name |
---|
System.String | apiKey |
GetUserApiKeys(String)
Declaration
public List<ApiKey> GetUserApiKeys(string userId)
Returns
System.Collections.Generic.List<ServiceStack.Auth.ApiKey>
Parameters
Type | Name |
---|
System.String | userId |
InitApiKeySchema()
Declaration
public void InitApiKeySchema()
StoreAll(IEnumerable<ApiKey>)
Declaration
public void StoreAll(IEnumerable<ApiKey> apiKeys)
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey> | apiKeys |
Implements